package easyTodo.client;

import java.util.ArrayList;

import easyTodo.client.R;
import easyTodo.client.views.NoteItemView;
import easyTodo.client.views.layouts.DetailedListView;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class EasyTodoList extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		/*
		 * ListView noteItemList = (ListView) findViewById(R.id.noteItemList);
		 * 
		 * TextView header = new TextView(this); header.setText("header");
		 * noteItemList.addHeaderView(header);
		 * 
		 * TextView footer = new TextView(this); footer.setText("footer");
		 * noteItemList.addFooterView(footer);
		 */
		ArrayList<String> al = new ArrayList<String>();



		ArrayAdapter<String> aa = new ArrayAdapter<String>(this,
				R.layout.note_item, al);

		// noteItemList.setAdapter(aa);

		TextView footer = new TextView(this);
		footer.setText("footer");

		TextView header = new TextView(this);
		header.setText("header");
		
		DetailedListView detailedList =(DetailedListView)findViewById(R.id.noteItemList);
		
		detailedList = new DetailedListView(this, header,
				footer);
		
		for(int k=0;k<20;k++){
			NoteItemView item =  new NoteItemView(this);
			item.setText("test " + k);
			detailedList.add(item);
		}

	}
}